Skip to content

add a tiny tolerance in floating-point arithmetic#158

Merged
victorsacek merged 1 commit into
mainfrom
fix_fp_in_get_rx_get_rz_swarm_move
Apr 10, 2026
Merged

add a tiny tolerance in floating-point arithmetic#158
victorsacek merged 1 commit into
mainfrom
fix_fp_in_get_rx_get_rz_swarm_move

Conversation

@rafaelmds
Copy link
Copy Markdown
Member

It happens, very rarely, that some imprecision of floating-point arithmetic results in abort of the simulation due to a check in particle position.

This add a tolerance check around the interval of interest [0, 1] allowing for tiny deviations from the expected interval.

Current tests are fine ✅ with this modification.

@rafaelmds rafaelmds requested a review from victorsacek March 12, 2026 10:58
@rafaelmds
Copy link
Copy Markdown
Member Author

@victorsacek I'll merge it if you're happy with it.

@victorsacek victorsacek merged commit fa7c59f into main Apr 10, 2026
1 check passed
@victorsacek victorsacek deleted the fix_fp_in_get_rx_get_rz_swarm_move branch April 10, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants